package cn.openea.perpartner.wxpay.service;

import cn.openea.perpartner.wxpay.vo.PayVo;
import cn.openea.perpartner.wxpay.vo.R;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @codeDesc: 微信支付统一接口
 * @author: Mr.Yun
 * @QQ: 2034374624
 * @version: V1.0
 * @Created: 2021/11/26 14:00
 */
public interface WxPayService {

    // 小程序创建统一支付订单，支持特殊0元支付
    R createUnifiedorder(PayVo payVo) throws Exception;

    // 小程序支付订单成功后回调统一函数
    String createOrderNotify(HttpServletRequest request, HttpServletResponse response) throws Exception;

    // 依据订单号查询订单信息
    R queryOrderByTradeNo(PayVo payVo) throws Exception;

    // 依据订单号查询订单是否支付成功 code = 200成功 201失败 500系统错误
    R queryOrderByTradeNoIsok(PayVo payVo) throws Exception;

    // 创建从商户退款订单
    R refundByTradeNo(PayVo payVo) throws Exception;

    // 商户退款订单结果通知
    String refundOrderNotify(HttpServletRequest request, HttpServletResponse response) throws Exception;

    // 创建从企业商户支付到用户零钱的订单
    R payToPersonalChange(PayVo payVo) throws Exception;

}
